import { createStore, applyMiddleware } from 'redux'
import { getToken } from '@/utils/token'
import { rootReducer } from './reducers'
import { thunk } from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
const middleweare = composeWithDevTools(applyMiddleware(thunk))
const initialState = {
  login: getToken()
}
const store = createStore(rootReducer, initialState, middleweare)
export default store
